<?php
	/* Description: This file is used to display all category */
	#########IncludeFiles####################################################################################
	require_once '../inc/config.php';
	require_once "../inc/bootstrape.php";
	//require_once _SITE_PATH_.'classes/Vendor/Vendor.php';
	require_once _SITE_PATH_.'classes/Venue/Venue.php';
	require_once _SITE_PATH_.'classes/CommonUtility/CommonUtility.php';

	$action = trim($_REQUEST['action']);
	$id = trim($_REQUEST['id']);
	
	switch($action){
		case 'active':
			$parms['status'] = 1;
			$condition['id'] = $id;
			$row = CommonUtility::updateData($parms,$table='venue_rating_master',$condition);
			$errMsg = "1321" ;
		break;
		case 'deactive':
			$parms['status'] = 0;
			$condition['id'] = $id;
			$row = CommonUtility::updateData($parms,$table='venue_rating_master',$condition);
			$errMsg = "1322" ;
		break;
		case 'delete':
			$parms['status'] = 2;
			$condition['id'] = $id;
			$row = CommonUtility::updateData($parms,$table='venue_rating_master',$condition);
			$errMsg = "1323" ;
		break;
	}
	if( $errMsg ){
		header("Location: venuerating_mng.php?msg=".$errMsg);
		exit;
	}

	$venueratings = array();
	$venueratings = Venue::getVenueRatings();

	$errMsg = $_GET['msg'];
	$_tplName = 'venue/venuerating_mng.tpl';
	$_title = 'Venue Rating Management';
	require_once _ADMIN_TPL_MAIN_;
?>